<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>组件</title>
    <script src="../vue.js"></script>
  </head>
  <body>
    <div id="app">
      <my-component v-for="item in items" v-bind:item="item"></my-component>
    </div>
    <script>
      const Feature = Vue.component("my-component", {
        props: ["item"],
        template: "<li>{{ item }}</li>",
      });
      new Vue({
        el: "#app",
        data: {
          items: ["迪丽热巴", "古力娜扎", "范冰冰", "汤唯"],
        },
      });
    </script>
  </body>
</html>
